/**
 * 2016，thor.com，all rights reserved。
 * 
 * Project：		palmmall-spi
 * Filename：	SBasicService.java
 * Created：		2016年9月5日
 * Creator：		wolv
 */
package com.thor.palmmall.spi.basic;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import com.thor.commons.entity.UCN;
import com.thor.palmmall.spi.brand.SBizType;
import com.thor.palmmall.spi.common.SQueryResult;
import com.thor.palmmall.spi.common.SResponse;
import com.thor.palmmall.spi.common.SUserGroupQueryParam;
import com.thor.palmmall.spi.device.SDevice;
import com.thor.palmmall.spi.device.SDeviceCategoryField;
import com.thor.palmmall.spi.inspect.SCategory;
import com.thor.palmmall.spi.meter.SMeter;

/**
 * @author wolv
 *
 */
@Path("/1/basic")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface SBasicService {

  @GET
  @Path(value = "/device/categorys")
  SResponse<List<SDeviceCategory>> queryCategorys(@QueryParam("isMaintenance") boolean isMaintenance,
      @QueryParam("isInspect") boolean isInspect);

  @GET
  @Path(value = "/device/devices")
  SResponse<List<SDevice>> queryDevice(@QueryParam("storeUuid") String storeUuid,
      @QueryParam("categoryUuid") String categoryUuid);

  @GET
  @Path(value = "/device/{uuid}")
  SResponse<SDevice> getDevice(@PathParam("uuid") String uuid);

  @GET
  @Path(value = "/device/inspectItems")
  SResponse<List<SDeviceCategoryField>> queryInspectItems(@QueryParam("category") String category,
      @QueryParam("isMaintenance") boolean isMaintenance);

  @GET
  @Path(value = "/meter/meters")
  SResponse<List<SMeter>> queryMeters(@QueryParam("storeUuid") String storeUuid,
      @QueryParam("serialNumber") String serialNumber,
      @QueryParam("categoryCode") String categoryCode);

  @GET
  @Path(value = "/meter/{uuid}")
  SResponse<SMeter> getMeter(@PathParam("uuid") String uuid);

  @POST
  @Path(value = "/materials")
  SResponse<SQueryResult<SMaterial>> queryMaterial(SMaterialQueryParam param);

  @GET
  @Path(value = "/sales/all-payments")
  SResponse<List<SPayments>> getAllPayments();

  @GET
  @Path(value = "/device/servicemans")
  SResponse<List<UCN>> serviceMans();

  @GET
  @Path(value = "/statement/bizType")
  SResponse<List<SBizType>> bizType(@QueryParam("onlyUpper") Boolean onlyUpper);

  @POST
  @Path(value = "/statement/buildings")
  SResponse<List<UCN>> buildings(SBuildingsParam param);

  @POST
  @Path(value = "/statement/floors")
  SResponse<List<UCN>> floors(SFloorsParam param);

  @POST
  @Path(value = "/contract/products")
  SResponse<List<SContractProducts>> products(SProductsParam param);

  @GET
  @Path(value = "/oper-inspect/category")
  SResponse<List<SCategory>> inspectCategories();

  @GET
  @Path(value = "/oper-inspect/category/{uuid}")
  SResponse<List<SCategory>> getCategory(@PathParam("uuid") String uuid);

  @POST
  @Path(value = "/brands")
  SResponse<SQueryResult<UCN>> brands(SUserGroupQueryParam queryParam);

  @POST
  @Path(value = "/positions")
  SResponse<SQueryResult<UCN>> positions(SUserGroupQueryParam queryParam);

  @GET
  @Path(value = "/brand/grades")
  SResponse<List<String>> grades();

  @GET
  @Path(value = "/typeTag")
  SResponse<List<String>> typeTag(@QueryParam("category") String category,
      @QueryParam("subType") String subType);

}
